home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1993 / MacHack 1993.toast / MacHack™ 1987-1992 / MacHack™ '90 / Source Code ƒ / MPW C ƒ / SonOfGrepƒ / FindChanges < prev    next >
Encoding:
Text File  |  1990-01-20  |  1.0 KB  |  49 lines  |  [TEXT/MPS ]

  1. # This script searches all source files for changes I made to them while
  2. # porting.  (All changes are marked with my initials.)  Results are deposited
  3. # in the target file, by default Changes.MJS.
  4.  
  5. set TargetFile Changes.MJS
  6. set SourceDirectory :
  7. set Sources "Grep-MJS.h Grep.c SonOfGrep.make Tools.c Tools.h"
  8.  
  9. open -n {TargetFile}
  10. find •:∞ {TargetFile}
  11. clear § {TargetFile}
  12.  
  13. set OldExit {Exit}
  14. set Exit 0
  15.  
  16. for SourceFile in {Sources}
  17.     open -r -t {SourceDirectory}{SourceFile}
  18.     find • {SourceDirectory}{SourceFile}
  19.     loop
  20.         find /≈MJS:/:!1 {SourceDirectory}{SourceFile}
  21.         if {Status} != 0
  22.             break
  23.             end
  24.         echo ================== File {SourceFile}∂; Line `position -l` ================== >> {TargetFile}
  25.         copy § {SourceDirectory}{SourceFile}
  26.         paste ∞ {TargetFile}
  27.         end
  28.     close {SourceDirectory}{SourceFile}
  29.     end
  30.     
  31. find • {TargetFile}
  32. loop
  33.     find /•∂n/ {TargetFile}
  34.     if {Status} != 0
  35.         break
  36.         end
  37.     clear § {TargetFile}
  38.     end
  39. find • {TargetFile}
  40. loop
  41.     find /•[∂t]+/ {TargetFile}
  42.     if {Status} != 0
  43.         break
  44.         end
  45.     clear § {TargetFile}
  46.     end
  47.  
  48. set Exit {OldExit}
  49.